
<div class="topleft"><a href="../index.html" target="_parent"><img src="../images/nxmu.png" title="系统首页"/></a>
    <span>宁夏医科大学教学岗位聘用评分信息系统</span>
</div>

<div class="topright">
    <ul>
        <li>
            <a href="#" id="todayDate">今天是</a>
        </li>
        <li><a id="logout">退出</a></li>
    </ul>
    <div class="user">
        <span id="userName">用户未登录</span>
    </div>
</div>

<script>
    var todayDate = new Date();
    var month = todayDate.getMonth()+1;
    var todayStr = todayDate.getFullYear()+'年'+month+'月'+todayDate.getDate()+'日';
    $("#todayDate").html('今天是'+todayStr);

    var userName = sessionStorage.getItem('userName');
    var userId = sessionStorage.getItem('userId');
    var curRole = sessionStorage.getItem('curRole');
    if(!userName || !userId || !curRole){
        showTip('未查询到您的登录状态',function () {
            window.location = 'login.html';
        })
    }
    $("#userName").html(userName);

    $("#logout").click(function () {
        requests.getReq(urls.logout,'',function (data) {
            sessionStorage.clear();
            window.location = 'login.html';
        })
    })

</script>
